<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="__PUBLIC__/css/pintuer.css">
<link rel="stylesheet" href="__PUBLIC__/css/admin.css">
<script src="__PUBLIC__/js/jquery.js"></script>
<script src="__PUBLIC__/js/pintuer.js"></script>


</head>
<body>
<form method="post" action="" id="listform">
  <div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> 新进商家列表</strong> </div>
    <table class="table table-hover text-center">
      <tr>
        <th width="100" style="text-align:left; padding-left:20px;">商家名称</th>
        <th width="5%">联系人</th>
        <th width="5%">注册电话</th>
		<th width="5%">上级</th>
        <th width="5%">所在地区</th>
        <th width="10%">详细地址</th>
        <th width="10%">店铺类型</th>
        <th width="10%">店铺简介</th>
        <th width="10%">店铺图片1</th>
        <th width="10%">店铺图片2</th>
        <th width="310">操作</th>
      </tr>
      <volist name="list" id="vo" key="k">
	      <tr>
		        <td style="text-align:left; padding-left:20px;">
		          	{$vo.name}
		        </td>
		        <td>{$vo.contacts}
		        </td>
		        <td width="10%">
		          	<font color="#00CC99">{$vo.phone}</font>
		        </td>
				<td>
					<?php
						
						if(!$vo['pid']){
							echo '无';
						}elseif($vo['is_user']){						
							$mysql_server_name='127.0.0.1'; //改成自己的mysql数据库服务器
							 
							$mysql_username='root'; //改成自己的mysql数据库用户名
							 
							$mysql_password='root'; //改成自己的mysql数据库密码
							 
							$mysql_database='cdzx'; //改成自己的mysql数据库名

							$conn=mysql_connect($mysql_server_name,$mysql_username,$mysql_password) or die("数据库链接错误") ; //连接数据库
							 
							mysql_query("set names 'utf8'"); //数据库输出编码 
							 
							mysql_select_db($mysql_database); //打开数据库
							$sql ="select * from user where user_Id = ".$vo['pid']; //SQL语句
							$result = mysql_query($sql,$conn); //查询
							$row = mysql_fetch_array($result);
							echo $row['name'];
						}else{
							$mysql_server_name='127.0.0.1'; //改成自己的mysql数据库服务器
							 
							$mysql_username='root'; //改成自己的mysql数据库用户名
							 
							$mysql_password='root'; //改成自己的mysql数据库密码
							 
							$mysql_database='cdzx'; //改成自己的mysql数据库名

							$conn=mysql_connect($mysql_server_name,$mysql_username,$mysql_password) or die("数据库链接错误") ; //连接数据库
							 
							mysql_query("set names 'utf8'"); //数据库输出编码 
							 
							mysql_select_db($mysql_database); //打开数据库
							$sql1 ="select * from shop where shop_id = ".$vo['pid']; //SQL语句
							$result1 = mysql_query($sql1,$conn); //查询
							$row1 = mysql_fetch_array($result1);
							echo $row1['contacts'];
						}  
					?>
				</td>
		        <td>{$vo.area}</td>
		        <td>{$vo.address}</td>
		        <td>{$vo.type}</td>
		        <td>{$vo.synopsis}</td>
		        <td><p class="example"><img src="__PUBLIC__/Uploads/{$vo.photo1}" alt="" width="70" height="50" /></p></td>
		        <td><p class="example"><img src="__PUBLIC__/Uploads/{$vo.photo2}" alt="" width="70" height="50" /></p></td>
		        <td>
			        <div class="button-group"> 
			          	<a class="button border-main" href="__URL__/via/id/{$vo.shop_id}"><span class="icon-edit"></span>通过</a> 
			          	<a class="button border-red" href="__URL__/noVia/id/{$vo.shop_id}"><span class="icon-edit"></span> 不通过</a> 
			        </div>
		          </td>
	        </tr>
	</volist>
         
      <tr>
        <td colspan="8"><div class="pagelist"> {$page} </div></td>
      </tr>
    </table>
  </div>
</form>
</body>

</html>